package com.lkx.farmershop.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * (Chat)实体类
 *
 * @author makejava
 * @since 2025-02-12 15:29:54
 */
@Getter
@Setter
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Chat implements Serializable {
    private static final long serialVersionUID = 295503749833766077L;
    /**
     * 主键
     */
    @TableId
    private Long id;
    /**
     * 所属组团id
     */
    private Long tuanId;
    /**
     * 聊天内容
     */
    private String messageContent;
    /**
     * 发言者id
     */
    private Long userId;
    /**
     * 发言时间
     */
    private LocalDateTime sendTime;

    public Chat(Long tuanId, String messageContent, Long userId, LocalDateTime sendTime) {
        this.tuanId = tuanId;
        this.messageContent = messageContent;
        this.userId = userId;
        this.sendTime = sendTime;
    }
}

